Analyze Polis data
Analyze Polis data with your own Python scripts
2023-06-21
https://gyazo.com/41dbf7cf1ac885827d28dc9bbbae9d20
59 people
code:py
import pandas as pd
df = pd.read_csv("/Users/nishio/Downloads/polis.csv")
matrix = df.pivot_table(index="pid", columns="tid", values="vote")
print(matrix)
https://gyazo.com/e08623d52b83779b1db863dfb491d2c9
75 rows
code:py
matrix = matrix.dropna(thresh=3)
print(matrix.shape)
# => (59, 8)
The paper said 7 was the threshold, but it actually looks like 3.
K-3
https://gyazo.com/02458b971fbad2068ab060ce0575a508
https://gyazo.com/024b99a6ea894895dc345ffb441bff82
https://gyazo.com/39b7589b772d69ec0f047da7daa3a5e0
https://gyazo.com/26de6308bf8b358fad9a85c240c925c2
https://gyazo.com/2828ca1c6ea1d4eab64c78677cd05ac0https://gyazo.com/41dbf7cf1ac885827d28dc9bbbae9d20
0 12
1 36
2 11
Hmmm, I got a picture that looks like that, but the results don't match.
It's done.
https://gyazo.com/8a746a484dff28c8c0971b0b0207b3cb
code::
comment 7
Count of +1 votes in group: 0.0
Count of 0 votes in group: 2.0
Count of -1 votes in group: 12.0
Count of +1 votes outside group: 19.0
Count of 0 votes outside group: 19.0
Count of -1 votes outside group: 7.0
pvalue: 5.840739168435112e-05
Polis clustering and calculation of "characteristic responses" per cluster from CSV of polling data without Polis backend implementation.
2023-06-22
https://gyazo.com/f3fec605e6fa35612f21ad1a1c3cd461https://gyazo.com/41dbf7cf1ac885827d28dc9bbbae9d20
https://gyazo.com/f6e42bdef2612da442f54e526178edba
---
This page is auto-translated from /nishio/Polisのデータを解析 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.